home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Deutsche Edition 1
/
Deutsche Edition 1.iso
/
amok
/
amok_lha
/
amok03.lha
/
IFFLoad_1.1
/
ShowCycle.mod
< prev
next >
Wrap
Text File
|
1993-08-15
|
2KB
|
68 lines
(*---------------------------------------------------------------------------
:Program. ShowCycle.mod
:Author. Fridtjof Siebert
:Address. Nobileweg 67, D-7-Stgt-40
:Phone. 0711/822509
:Shortcut. [fbs]
:Version. 1.0
:Date. 20.04.88
:Copyright. PD
:Language. Modula-II
:Translator. M2Amiga
:Imports. IFFLoad [fbs].
:UpDate. none.
:Contents. Demo zu IFFLoad für Colorcycling.
:Remark. Syntax: ShowCycle <filename>
---------------------------------------------------------------------------*)
MODULE ShowCycle;
FROM SYSTEM IMPORT ADR, ADDRESS, SHIFT, BITSET, LONGSET, CAST;
FROM Arguments IMPORT NumArgs,GetArg;
FROM Intuition IMPORT ScreenPtr,CloseScreen,DisplayBeep,WindowPtr;
FROM IFFLoad IMPORT ReadILBM,ReadILBMFlags,ReadILBMFlagSet,DoCycle,EndCycle,
IFFInfo;
VAR
MyScreen: ScreenPtr; (* the Picture's ScreenPointer *)
WindowDummy: WindowPtr; (* only a dummy for NIL-Windowpointer *)
Name: ARRAY[0..79] OF CHAR; (* the Picture's Name *)
length: INTEGER; (* dummy for receiving Name's Length *)
Ciapra [0BFE001H]: SET OF (s0,s1,s2,s3,s4,s5,lmb);
(* Ciapra is a Hardware-Register. Bit #6 contains the left Button *)
BEGIN
(*------ Get Name: ------*)
IF NumArgs()#0 THEN
GetArg(1,Name,length);
ELSE
HALT; (* a silly guy didn't say which pic I should load *)
END;
(*------ Read and Show Pic: ------*)
IF ReadILBM(Name,ReadILBMFlagSet{front,visible},MyScreen,WindowDummy) THEN
(*------ start ColorCycling: ------*)
IF DoCycle(ADR(IFFInfo),MyScreen) THEN END;
WHILE lmb IN Ciapra DO END;
(* that's bad style, but it's the easiest way to wait for left Button *)
(*------ stop ColorCycling (this mustn't be forgotten !!!) ------*)
EndCycle(ADR(IFFInfo));
CloseScreen(MyScreen); (* close the Screen *)
ELSE
DisplayBeep(NIL); (* any error occured: lets display a Beep ! *)
END;
END ShowCycle. That's all. Wasn't that easy ???